<div class="row">
    <div class="col-sm-7">
        <h1 class="pagetitle"><span translate lib="web">detailsfor</span> {{ctrl.model.name}}</h1>
    </div>
</div>

<pre ng-show="ErrorMessage!=null">{{ ErrorMessage }}</pre>
<a href="" ng-hide="ctrl.showjson==true" ng-click="ctrl.togglejson()" translate lib="web">showjson</a>
<a href="" ng-hide="ctrl.showjson==false" ng-click="ctrl.togglejson()" translate lib="web">showproperties</a>
<form ng-submit="ctrl.submit()" class="form-horizontal" role="form" autocomplete="off" ng-hide="ctrl.showjson==true">

    <section ng-repeat="key in ctrl.keys">
        <div class="form-group">
            <label class="col-sm-3 control-label"><span translate lib="web" ng-model="key"></span>: <a href="" ng-click="ctrl.removekey(key)"
                translate lib="web">delete</a></label>
            <div class="col-sm-9">
                <input ng-model="ctrl.model[key]" class="form-control input-md" ng-disabled="ctrl.loading==true" />
            </div>
        </div>
    </section>


    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success"
            translate lib="web">save</button>
        </div>
    </div>
</form>

<form ng-submit="ctrl.submit()" class="form-horizontal" role="form" autocomplete="off" ng-hide="ctrl.showjson==false">
<div ng-hide="ctrl.showjson==false" class="form-group" style="width: 100%;">
    <div class="form-group">
        <label class="col-sm-3 control-label" translate lib="web">json</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="5" ng-model="ctrl.jsonmodel" style="max-width: 100%;"></textarea>

            <!-- <textarea msd-elastic  class="form-control" ></textarea> -->
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success"
            translate lib="web">save</button>
        </div>
    </div>
</div>
</form>